<include file="public@header" />
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<style>
    td
    {
        white-space: nowrap;
    }
</style>
</head>
<body >
<div class="table-responsive">
<ul class="nav nav-tabs">
    <li class="active"><a href="{:url('personnel/add')}">员工信息</a></li>
    <li><a href="{:url('personnel/adds')}">员工添加</a></li>
    <li><a href="#" onclick="job()">职位添加</a></li>
</ul>



    <table class="table table-bordered">
        <caption>员工详情</caption>
        <thead>


        <tr>
            <th>部门</th>
            <th>职务</th>
            <th>姓名</th>
            <th>工号</th>
            <th>登陆邮箱</th>
            <th>性别</th>
            <th>身份证号</th>
            <th>生日</th>
            <th>最后登录时间</th>
            <th>登录密码</th>
            <th>最后登录ip</th>
            <th>手机号</th>
            <th>地址</th>
            <th>店铺id</th>
            <th>状态</th>
            <th>操作</th>



        </tr>

        </thead>
        <tbody>
        <foreach name="user" item="vo">
            <php>
                $status=array("1"=>'在职',"0"=>'离职');
                $sex=array("1"=>'男',"2"=>'女',"0"=>'保密')
            </php>
        <tr>
            <td>{$vo.depart}</td>
            <td>{$vo.duty}</td>
            <td>{$vo.user_login}</td>
            <td>{$vo.job_num}</td>
            <td>{$vo.user_email}</td>
            <td>
                <if condition="($vo['sex']==0)">
                    保密
                    <elseif condition="$vo['sex'] eq 1"/>
                    男
                    <elseif condition="$vo['sex'] eq 2">
                        女

                </if>
            </td>
            <td>{$vo.idnumber}</td>
            <td>{$vo.birthday|date="Y-m-d H:i",###}</td>
            <td>{$vo.last_login_time|date="Y-m-d H:i",###}</td>
            <td>{$vo.user_pass}</td>
            <td>{$vo.last_login_ip}</td>
            <td>{$vo.mobile}</td>
            <td>{$vo.address}</td>

            <td>{$vo.storeid}</td>
            <td>
                <if condition="($vo['user_status']==0)">
                    <a href="{:url('personnel/status',array('id'=>$vo['id']))}" >已拉黑</a>
                    <elseif condition="$vo['user_status'] eq 1"/>
                    <a href="{:url('personnel/status',array('id'=>$vo['id']))}">正常</a>

                </if>
            </td>
            <td>
                <a href="{:url('personnel/edit',array('id'=>$vo['id']))}">编辑</a>
                <a href="{:url('personnel/del',array('id'=>$vo['id']))}" onClick="return confirm('确定删除?');">删除</a>
            </td>

        </tr>
        </foreach>
        </tbody>
    </table>


    </div>
</body>
</html>
<script>
    function job(){
        layer.open({
            type: 2,
            title: '职位添加',
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['893px', '600px'],
            content: '//www.wyc.com/blog/personnel/job'//视图路径
        });
    }
</script>